<?php

echo "svamp";

//if ($category)
//{
//    $low = $category."00";
//    $high = ($category+1)."00";
//    if ($sub) $getcatnews = mysql_query("SELECT `news_id` FROM `news_groups` WHERE `group_id` = '$category"."$sub'");
//    else $getcatnews = mysql_query("SELECT `news_id` FROM `news_groups` WHERE `group_id` BETWEEN $low AND $high");
//    while ($gcn = mysql_fetch_assoc($getcatnews))
//    {
//        $buffer[] = $gcn['news_id'];
//    }
//    if ($buffer)
//    {
//        $categories = implode(",",$buffer);
//        $buffer=null;
//        $catsql = "`id` IN($categories) AND";
//    }
//    else die("Inga nyheter hittades"); //inga nyheter hittades
//}
//$get=mysql_query("SELECT SQL_CALC_FOUND_ROWS `id`, `title`, `text`, `text2`, `mainlink`, `mainlink_activated`, `date_publish`, `date_publish2`, `date_publish3`, `date_publish4`, `user_id`, `text_source`, `img_source`, `img_file`, `img_description` FROM `news` WHERE $catsql `approved`='1' AND `deleted`='0' AND NOW() BETWEEN `date_publish`	AND `date_end` ORDER BY `date_publish` DESC, `id` DESC") or die(mysql_error());
//while ($gn = mysql_fetch_assoc($get))
//{
//    while ($gn = mysql_fetch_assoc($get))
//    {
//        if (!$latest) $latest = $gn;
//        $date1 = $gn['date_publish'];
//        $date2 = $gn['date_publish2'];
//        $date3 = $gn['date_publish3'];
//        $date4 = $gn['date_publish4'];
//        if ($date1 > "0000-00-00 00:00:00") $news[$date1][]=$gn;
//        if ($date2 > "0000-00-00 00:00:00") $news[$date2][]=$gn;
//        if ($date3 > "0000-00-00 00:00:00") $news[$date3][]=$gn;
//        if ($date4 > "0000-00-00 00:00:00") $news[$date4][]=$gn;
//
//    }
//    $i=0;
//    krsort($news);
//    foreach ($news as $date=>$n)
//        {
//            if ($date >= date("Y-m-d H:i:s")) continue;
//            foreach ($n as $gn)
//            {
//                if (++$i > ($offset * 60)) { $limitreached=true; break; }
//                $text = strip_tags($gn['text'])." ".strip_tags($gn['text2']);
//                $title = substr($gn['title'],0,40);
//                $lentitle = strlen(strip_tags($title));
//
//                if (strlen($text) + $lentitle > 70) $text = substr($text,0,(70 - $lentitle));
//
//                echo "<div style=\"padding:4px\"><small>".substr($gn['date_publish'],0,10)."</small><br/><a href=\"?page=news";
//                if ($category) echo "&cat=$category";
//                if ($_GET['sub']) echo "&sub=$sub";
//                echo "&id=$gn[id]\"><b>".strip_tags($title)."</b>. $text &gt;&gt;</a></div>";
//            }
//        }
//}
//if ($limitreached) echo "<br/><div style=\"text-align:right\" id=\"expander\"><a href=\"javascript:expand_news(", $offset+1,");\">Fler nyheter &gt;&gt;</a></div>";



?>
